/**
 * Created by jiachneyu on 2018/5/7.
 */
const nm = require('nodemailer');

let transporter = nm.createTransport({
    service: '163',
    auth: {
        user: 'm17600684558@163.com',
        pass: 'a789632145'
    }
})

const html = ``

const mailOptions = {
    from: 'm17600684558@163.com',
    to: 'wangbinqi@xin.com',
    html: html
}

function sendEmail(mailOptions) {
    mailOptions.from = "m17600684558@163.com";
        transporter.sendMail(mailOptions, (err, info) => {
        if (err) {
            return console.log(err);
        }
        console.log("message sent: %s", info);
    })
}

module.exports = {
    sendEmail
};